/*******************************************************************************
* Copyright (c) 2012 
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* zhangliang - initial API and implementation
*******************************************************************************/

#ifndef CORE_ERROR_H
#define CORE_ERROR_H

#include "error.h"
#include "core/core_error_code.h"

class core_category_impl : public utils::error_category {
 public:
  virtual const char* name() const { return "core"; }
  virtual std::string message(int e) const;
};

const utils::error_category& core_category(void);
utils::error_code make_error_code(core_error::core_error_t ec);
utils::error_condition make_error_condition(core_error::core_error_t ec);

namespace boost {
namespace system {
template<>
struct is_error_code_enum<core_error::core_error_t> {
  static const bool value = true; 
};
}
}

#endif // CORE_ERROR_H

